#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QInputDialog>
#include "qcustomplot.h"
#include "WGCustomPlot.h"

namespace Ui {
class MainWindow;
}

class TTKGrabItemWidget;
class MainWindow : public QMainWindow
{
  Q_OBJECT
  
public:
  explicit MainWindow(QWidget *parent = 0);
  ~MainWindow();
  
private slots:
  void titleDoubleClick(QMouseEvent *event);
  void axisLabelDoubleClick(QCPAxis* axis, QCPAxis::SelectablePart part);
  void legendDoubleClick(QCPLegend* legend, QCPAbstractLegendItem* item);
  void selectionChanged();
  void mousePress();
  void mouseWheel();
  void addRandomGraph();
  void removeSelectedGraph();
  void removeAllGraphs();
  void contextMenuRequest(QPoint pos);
  void moveLegend();
  void graphClicked(QCPAbstractPlottable *plottable, int dataIndex);
  
  void on_pushButton_addGraph_clicked();
  void on_pushButton_updateGraph_clicked();
  void on_checkBox_dataDot_clicked(bool checked);
  void bracketDataSlot();

  void on_pushButton_save_clicked();

  void on_checkBox_srmZoom_clicked(bool checked);

private:
  void setup1();
  void setup2();
  void setup3();

private:
  Ui::MainWindow *ui;

  int m_scatterStyle;
  WGCustomPlotWidget *m_customPlot;
  TTKGrabItemWidget *m_moveWidget;
  QCustomPlot *customPlot;
  QCPItemTracer *itemDemoPhaseTracer;
  QTimer dataTimer;
};

#endif // MAINWINDOW_H
